package com.yanqu.road.server.cmd.activity.busyfarming;

import com.yanqu.road.pb.activity.BusyFarmingProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.logic.MessageHelper;
import com.yanqu.road.utils.YanQuMessageUtils;
import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.server.protocol.Protocol;

@Cmd(code = Protocol.C_BUSY_FARMING_WATERING_BACK,desc = "浇水")
public class CrossBusyFarmingWateringBackCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

        BusyFarmingProto.BusyFarmingWateringCrossRespMsg respMsg = BusyFarmingProto.BusyFarmingWateringCrossRespMsg.parseFrom(packet.getBytes());

        MessageHelper.sendPacket(respMsg.getSrcServerId(), respMsg.getSrcUserId(), YanQuMessageUtils.buildMessage(Protocol.S_BUSY_FARMING_WATERING_BACK_FROM_CROSS, respMsg.toBuilder()));
    }

    @Override
    public void sendData() {

    }
}
